package com.example.guet_assistant.controller;

import com.example.guet_assistant.result.Result;
import com.example.guet_assistant.service.ChatService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/chat")
public class ChatController {

    @Resource
    private ChatService chatService;

    @PostMapping("/qa")
    public Result<Map<String,String>> qa(String content) {
        return chatService.qa(content);
    }
}
